<!-- toaster directive -->
<toaster-container
        toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->
<!-- 导航条  -->
<style>
    h6 {
        font-size: 18px;
    }
</style>

<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-sref="main"><i class="glyphicon glyphicon-log-in"></i> 门禁管理</a></li>
        <li><a ui-sref="main.authm.group.list" class="active" ng-bind="title"></a></li>
    </ul>
</div>

<!-- 加载提醒 -->
<div ng-show="loading" class="text-center m-t-md text-lg dataWarn"><i class="fa fa-spin fa-spinner"></i> 数据加载中...</div>

<!-- 内容区域 -->
<div ng-hide="loading" class="wrapper-md content">
    <!-- 数据显示 -->
    <div class="wrapper-data">
        <div class="panel panel-default">
            <!-- 头部 -->
            <div class="panel-heading clearfix">
                <div class="w-auto">
                    <form ng-submit="doSearch()" class="form-inline">
                        <div class="form-group">
                            <label for="name">设备编码：</label>

                            <input type="text" class="form-control" ng-model="param.deviceCode" style="width: 120px">
                        </div>
                        <div class="form-group">
                            <label for="name">设备名称：</label>

                            <input type="text" class="form-control" ng-model="param.deviceName" style="width: 120px">
                        </div>
                        <div class="form-group">
                            <label for="identity">组名：</label> <input type="text"
                                                                     class="form-control" style="width: 120px"
                                                                     id="identity"
                                                                     placeholder="" ng-model="param.groupName">
                        </div>
                        <div class="form-group">
                            <label for="name">房屋地址：</label>

                            <input type="text" class="form-control" ng-model="param.address" style="width: 120px">
                        </div>

                        <div class="form-group">
                            <button type="submit" class="btn btn-primary new-primary"
                                    style="margin-left: 10px" ng-show="read">查询
                            </button>
                        </div>
                        <div class="form-group">
                            <a ui-sref="main.authm.group.create({'regionId':param.regionId,'regionName':regionName})"
                               class="btn btn-primary addNew" ng-show="add"><i class="glyphicon glyphicon-plus"></i>新增
                            </a>
                        </div>
                    </form>
                </div>
            </div>

            <!-- 数据表格 -->
            <div class="table-responsive">
                <table class="table table-striped b-t b-light text-center">
                    <thead>
                    <tr>
                        <th>设备编码</th>
                        <th>设备名称</th>
                        <th>房屋地址</th>
                        <th>组别名称</th>
                        <th>组别类型</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="item in pageInfo.data">
                        <td class="v-middle">{{item.deviceCode}}</td>
                        <td class="v-middle">{{item.deviceName}}</td>
                        <td class="v-middle">{{item.address}}</td>
                        <td class="v-middle">{{item.groupName}}</td>
                        <td class="v-middle">
                            <span ng-show="item.grouptype==0">区域</span>
                        </td>
                        <td class="v-middle">
                            <span ng-show="item.status_==0" class="text-danger">禁用</span>
                            <span ng-show="item.status==1" class="text-success">启用</span>
                        </td>
                        <td class="v-middle">
                            <a ui-sref="main.authm.group.update({id: item.id})"
                               style="border: none;color: #Fb7009; order-radius: 5px;" ng-show="update">编辑
                            </a>
                            <a ng-click="delItem(item.id,item.groupName,item.deviceName)"
                               style="border: none;color: #Fb7009; border-radius: 5px;" ng-show="dele">删除
                            </a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <!-- /.table-responsive -->

            <!-- 底部分页 -->
            <span data-ng-include=" 'src/tpl/pageInfo.html' "></span>
        </div>
        <!-- /.panel -->
    </div>
    <!-- /.wrapper-data -->

</div>
<!-- /.wrapper-md -->
